package vip.mtdp.asset.api.dto;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description
 * @Author Evans.wang
 * @since 2023/10/29 17:11
 **/
@Data
public class TxnDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String bizType;

    private Long vaultId;
    private String chain;
    private String coin;

    private Long orderId;

    /**
     * 1=初始化，2=成功，3=处理中，6=冲正
     */
    private Integer state;

    private Long feeAccount;

    private BigDecimal fee;

    private String feeCoin;
    private Date txnTime;

    /**
     * 关联源交易id，冲正交易使用
     */
    private Long refId;

    private List<TxnItemDTO> txnItemDTOList;

    //journal 使用
    private List<TxnItemDTO> payerList;
    private List<TxnItemDTO> payeeList;

    @Data
    public static class TxnItemDTO implements Serializable{
        private static final long serialVersionUID = 1L;

        private Long id;

        private Long txnId;

        /**
         * payer/payee
         */
        private String party;

        private String coin;

        private BigDecimal amount;

        private Long accountId;
        private String accountNo;
    }

}
